<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <script>

        var names = ['it','baizhan','hello'];
        names.shift();    //删除数组的第一个元素，并返回删除的元素，改变原数组
        console.log(names) //['baizhan','hello']
        names.unshift('world','java'); //在数组的开头添加元素，改变原数组，返回数组新的长度
        console.log(names) //['world','java','baizhan','hello']


    </script>


</body>
</html>